﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace WarehouseManagement.BusinessLogic.DTO
{
    public partial class ExportDTO : INotifyPropertyChanging, INotifyPropertyChanged
    {

        private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);

        private System.Guid _Id;

        private string _exportNumber;

        private System.DateTime _ExportDate;

        private System.Nullable<int> _CustomerId;

        private string _ExportReason;

        private string _Notes;

        private System.DateTime _CreatedDate;

        

        #region Extensibility Method Definitions
        partial void OnLoaded();
        partial void OnValidate(System.Data.Linq.ChangeAction action);
        partial void OnCreated();
        partial void OnIdChanging(System.Guid value);
        partial void OnIdChanged();
        partial void OnExportDateChanging(System.DateTime value);
        partial void OnExportDateChanged();
        partial void OnCustomerIdChanging(System.Nullable<int> value);
        partial void OnCustomerIdChanged();
        partial void OnExportReasonChanging(string value);
        partial void OnExportReasonChanged();
        partial void OnNotesChanging(string value);
        partial void OnNotesChanged();
        partial void OnCreatedDateChanging(System.DateTime value);
        partial void OnCreatedDateChanged();
        #endregion

        public ExportDTO()
        {
            OnCreated();
        }

        public System.Guid Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                if ((this._Id != value))
                {
                    this.OnIdChanging(value);
                    this.SendPropertyChanging();
                    this._Id = value;
                    this.SendPropertyChanged("Id");
                    this.OnIdChanged();
                }
            }
        }

        public System.DateTime ExportDate
        {
            get
            {
                return this._ExportDate;
            }
            set
            {
                if ((this._ExportDate != value))
                {
                    this.OnExportDateChanging(value);
                    this.SendPropertyChanging();
                    this._ExportDate = value;
                    this.SendPropertyChanged("ExportDate");
                    this.OnExportDateChanged();
                }
            }
        }

        public System.Nullable<int> CustomerId
        {
            get
            {
                return this._CustomerId;
            }
            set
            {
                if ((this._CustomerId != value))
                {
                    this.OnCustomerIdChanging(value);
                    this.SendPropertyChanging();
                    this._CustomerId = value;
                    this.SendPropertyChanged("CustomerId");
                    this.OnCustomerIdChanged();
                }
            }
        }

        public string ExportReason
        {
            get
            {
                return this._ExportReason;
            }
            set
            {
                if ((this._ExportReason != value))
                {
                    this.OnExportReasonChanging(value);
                    this.SendPropertyChanging();
                    this._ExportReason = value;
                    this.SendPropertyChanged("ExportReason");
                    this.OnExportReasonChanged();
                }
            }
        }

        public string ExportNumber
        {
            get
            {
                return this._exportNumber;
            }
            set
            {
                if ((this._exportNumber != value))
                {

                    this._exportNumber = value;
                    this.SendPropertyChanged("ExportNumber");
                   
                }
            }
        }


        public string Notes
        {
            get
            {
                return this._Notes;
            }
            set
            {
                if ((this._Notes != value))
                {
                    this.OnNotesChanging(value);
                    this.SendPropertyChanging();
                    this._Notes = value;
                    this.SendPropertyChanged("Notes");
                    this.OnNotesChanged();
                }
            }
        }

        public System.DateTime CreatedDate
        {
            get
            {
                return this._CreatedDate;
            }
            set
            {
                if ((this._CreatedDate != value))
                {
                    this.OnCreatedDateChanging(value);
                    this.SendPropertyChanging();
                    this._CreatedDate = value;
                    this.SendPropertyChanged("CreatedDate");
                    this.OnCreatedDateChanged();
                }
            }
        }

       
        public event PropertyChangingEventHandler PropertyChanging;

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void SendPropertyChanging()
        {
            if ((this.PropertyChanging != null))
            {
                this.PropertyChanging(this, emptyChangingEventArgs);
            }
        }

        protected virtual void SendPropertyChanged(String propertyName)
        {
            if ((this.PropertyChanged != null))
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

       
    }
}
